package main

import (
	"server/common"
	"server/services/access"
)

func main() {
	common.InitLogger()

	// TODO: 需要实现分布式消息分发
	accessService := access.NewAccessService(nil)
	if err := accessService.Init(); err != nil {
		common.Logger(common.SERVICE_TYPE_ACCESS).Fatalf("Failed to initialize access service: %v", err)
	}

	if err := accessService.Start(":8080"); err != nil {
		common.Logger(common.SERVICE_TYPE_ACCESS).Fatalf("Failed to start access service: %v", err)
	}
}
